/************************************************************************
 *
 * stdio_ts.h
 *
 * (c) Copyright 2005 Analog Devices, Inc.  All rights reserved.
 *
 ************************************************************************/

/*
   This header file contains all ADSPTS specific
   Analog extensions to the ANSI header file stdio.h.

   The header file is included by stdio.h by default.
   To disable the extensions, compile with the option:
        -D__NO_ANSI_EXTENSIONS__
 */

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* stdio_ts.h */
#endif

#ifndef  _STDIO_TS_H
#define  _STDIO_TS_H

#if defined(__cplusplus)
extern "C" {
#endif

#ifdef __TS_BYTE_ADDRESS
#ifdef __DOUBLES_ARE_FLOATS__
  #define snprintf   _snprintf32_ba
  #define vsnprintf  _vsnprintf32_ba
#else
  #define snprintf   _snprintf64_ba
  #define vsnprintf  _vsnprintf64_ba
#endif /* __DOUBLES_ARE_FLOATS__ */

#else

#ifdef __DOUBLES_ARE_FLOATS__
  #define snprintf   _snprintf32
  #define vsnprintf  _vsnprintf32
#else
  #define snprintf   _snprintf64
  #define vsnprintf  _vsnprintf64
#endif /* __DOUBLES_ARE_FLOATS__ */

#endif /* __TS_BYTE_ADDRESS */

int snprintf(char *_s, size_t _n, const char *_format, ...);
int vsnprintf(char *_s, size_t _n, const char *_format, char *_va_list);

#if defined(__cplusplus)
}          /* extern "C" */
#endif

#endif /* _STDIO_21XXX_H */
